<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/mytable/Bai_device.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/mytable/Bai_device.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '摄像头',
                name: 'mytable/Bai_device',
                url: "/Bai_device/",
                sortName: "cano"
            });
            const editFormFields = ref({"cano":"","deviceToken":"","deviceName":"","updateTime":"","rtspAddress":"","sjaddress":"","username":"","password":"","time_set":"","frame_time":"","point_mask":""});
            const editFormOptions = ref([[{"title":"设备ID，不能重复，手工编制，用于前台创建div","field":"cano"},
                               {"title":"设备Token","field":"deviceToken"}],
                              [{"title":"设备名称","field":"deviceName"},
                               {"title":"更新时间","field":"updateTime"}],
                              [{"title":"设备地址","field":"rtspAddress"},
                               {"title":"摄像头实际地址","field":"sjaddress"}],
                              [{"title":"相机用户名","field":"username"},
                               {"title":"相机密码","field":"password"}],
                              [{"title":"监控时间段(00:00:00,23:59:59)","field":"time_set"},
                               {"title":"图片获取周期(秒)","field":"frame_time","type":"number"}],
                              [{"title":"监控区域","field":"point_mask"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'id',title:'id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'cano',title:'设备ID，不能重复，手工编制，用于前台创建div',type:'string',link:true,width:110,align:'left',sort:true},
                       {field:'deviceToken',title:'设备Token',type:'string',width:110,align:'left'},
                       {field:'deviceName',title:'设备名称',type:'string',width:110,align:'left'},
                       {field:'updateTime',title:'更新时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'rtspAddress',title:'设备地址',type:'string',width:110,align:'left'},
                       {field:'sjaddress',title:'摄像头实际地址',type:'string',width:110,align:'left'},
                       {field:'username',title:'相机用户名',type:'string',width:220,align:'left'},
                       {field:'password',title:'相机密码',type:'string',width:220,align:'left'},
                       {field:'time_set',title:'监控时间段(00:00:00,23:59:59)',type:'string',width:220,align:'left'},
                       {field:'frame_time',title:'图片获取周期(秒)',type:'int',width:80,align:'left'},
                       {field:'point_mask',title:'监控区域',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
